package cn.buddha.jesw.mvc.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @ClassName CommonService
 * @Author 友野浩二
 * @Date 2019/12/4 12:49
 * @Description 通用service测试
 * @Version 1.0
 */
@Service
@Slf4j
public class CommonService {

    public String taskOne(String arg) {
        log.info("cn.buddha.jesw.mvc.service.CommonService.taskOne start");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            log.error("tread exception: ", e);
        }
        log.info("cn.buddha.jesw.mvc.service.CommonService.taskOne end");
        return "SUCCESS" + ", " + arg;
    }

    public String taskTwo(String arg) {
        log.info("cn.buddha.jesw.mvc.service.CommonService.taskTwo start");
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            log.error("tread exception: ", e);
        }
        log.info("cn.buddha.jesw.mvc.service.CommonService.taskTwo end");
        return "SUCCESS" + ", " + arg;
    }

}
